package com.yami.shop.mystery.common.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 盲盒开奖记录
 * @author wxf
 * @date 2023/4/14 11:08
 */
@Data
@TableName("tz_mystery_box_open_record")
public class MysteryBoxOpenRecord implements Serializable {

    private static final long serialVersionUID = 1L;

    public MysteryBoxOpenRecord() {
    }

    public MysteryBoxOpenRecord(String uid, Long bid, Long pid, String tokenId, Date createTime, Integer status) {
        this.uid = uid;
        this.bid = bid;
        this.pid = pid;
        this.tokenId = tokenId;
        this.createTime = createTime;
        this.status = status;
    }

    @TableId
    @Schema(description = "主键")
    private Long id;

    @Schema(description = "盒子编号")
    private Long bid;

    @Schema(description = "用户编号")
    private String uid;

    @Schema(description = "商品编号")
    private Long pid;

    @Schema(description = "使用的卡卷编号")
    private String cid;

    @Schema(description = "开盒时间")
    private Date openTime;

    @Schema(description = "创建时间")
    private Date createTime;

    @Schema(description = "状态 0：待开盒 1：已开盒待资产到账 2：已完成")
    private Integer status;

    @Schema(description = "币唯一标识")
    private String tokenId;

    @TableField(exist = false)
    private int totalCount;

    @TableField(exist = false)
    @Schema(description = "盲盒名称")
    private String boxName;

    @TableField(exist = false)
    @Schema(description = "商品名称")
    private String prodName;

    @TableField(exist = false)
    @Schema(description = "商品图片")
    private String pic;

    @TableField(exist = false)
    @Schema(description = "创作者")
    private String authorName;

}
